﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Grinko.Lists;

namespace Tests
{
  [TestFixture]
    class TestsWithTestCase
    {
        static int[] x = { 1, 2, 3, 4, 5 };
        static IList[] listOfiList = {new MyList(x), new MyDimList(x)};

        private void Init(int amount)
        {
            x = new int[amount];
            for (int i = 0; i < amount; i++)
            {
                x[i] = i;
            }
            listOfiList[0] = new MyList(x);
            listOfiList[1] = new MyDimList(x);
        }

        [Test]
       
        public void TestGetItem(IList mylist)
        {
            int actual = mylist.GetItem(1);
            int expected = x[1];
            Assert.AreEqual(expected, actual);
        }

        [Test]
        public void TestCount(IList mylist, [Values(0, 1, 20)]int size)
        {
            Init(size);
            //foreach (IList actual in listOfiList)
            //{
            int actual = mylist.Count;
            Assert.AreEqual(size, actual);
            //}
        }
    }
}
